<dependency> <groupId>org.switchyard.components</groupId> <artifactId>switchyard-component-camel-netty</artifactId> <version>SWITCHYARD-VERSION</version> </dependency>
SwitchYard provides support for network level integration with TCP and UPD protocols.
The TCP and UDP binding is built on top of camel-netty and supports most of options for this endpoint. Please refer camel documentation for detailed description of them.
This binding have it's own namespace. To use it you must declare namespace with uri urn:switchyard-component-camel-netty:config:1.0. Your Maven project should also have following dependency:
<dependency> <groupId>org.switchyard.components</groupId> <artifactId>switchyard-component-camel-netty</artifactId> <version>SWITCHYARD-VERSION</version> </dependency>
SwitchYard 0.7 and above uses <binding.tcp> and <binding.udp>. Earlier versions uses <binding.netty-tcp> and <binding.netty-udp>.
Following options can be apiled to <binding.tcp> and <binding.udp definition:
host
port
receiveBufferSize
sendBufferSize
reuseAddress
encoders
decoders
allowDefaultCodec
workerCount
sync
disconnect
textline
tcpNoDelay
keepAlive
broadcast
Here's an example of what a file service binding looks like:
<sca:composite name="camel-binding" targetNamespace="urn:switchyard-quickstart:camel-binding:0.1.0"> <sca:service name="GreetingService" promote="GreetingService"> <camel:binding.tcp> <camel:host>localhost</camel:host> <camel:port>3939</camel:port> <camel:allowDefaultCodec>false</camel:allowDefaultCodec> <camel:sync>false</camel:sync> </camel:binding.tcp> <camel:binding.udp> <camel:host>localhost</camel:host> <camel:port>3940</camel:port> <camel:allowDefaultCodec>false</camel:allowDefaultCodec> <camel:sync>false</camel:sync> </camel:binding.udp> </sca:service> </sca:composite>